package girlfriend;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;

public class UsagirlFriend implements Girlfriend, BeanPostProcessor {
    public UsagirlFriend (){
        System.out.println("美国妹");
    }
    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {

        System.out.println("USA的init方法,来自"+beanName);
        return bean;
    }
    public void kiss() {
        System.out.println("$500");
    }
    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {

        System.out.println("USA的destory方法来自"+beanName);
        return bean;
    }
}
